function Dog(name) {
    this.name = name;
}

Dog.prototype.numLegs = 4;

let beagle = new Dog("Snoopy");

let ownProps = [];
let prototypeProps = [];

// 请把你的代码写在这条注释以下
for (let key in beagle) {
    if (beagle.hasOwnProperty(key)) {
        ownProps.push(key);
    } else {
        prototypeProps.push(key);
    }
}
